﻿using System.Web.Mvc;

namespace ASPNETMVCApplication.Areas.Cust
{
    public class CustAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Cust";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(null, "cust", new { controller = "Product", action = "Index" });
            context.MapRoute(null, "cust/Product/SearchCategory", new { controller = "Product", action = "SearchCategory" });
            context.MapRoute(null, "cust/Customer/Register", new { controller = "Customer", action = "Register" });
            context.MapRoute(null, "cust/Customer/Login", new { controller = "Customer", action = "Login" });
            context.MapRoute(
                "Cust_default",
                "Cust/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}
